#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include "trackview.h"


#if _MSC_VER >= 1600 // VS2010版本是1600
#pragma execution_character_set("utf-8")
#endif

QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

private slots:
    void on_addVehicle_clicked();
    void on_removeVehicle_clicked();
    void on_startAnimation_clicked();
    void on_stopAnimation_clicked();
    void on_radiusSlider_valueChanged(int value);
    void on_lengthSlider_valueChanged(int value);
    void on_speedSlider_valueChanged(int value);
    void on_vehicleColor_clicked();
    void on_vehicleSize_valueChanged(int value);
    void on_vehicleTexture_clicked();
    
    void updateVehicleInfo();
    void slot_actionAbout();
    void slot_actionExit();

private:
    Ui::MainWindow *ui;
    TrackView *m_trackView;
    
    void setupConnections();
    void updateStatusBar();
};

#endif // MAINWINDOW_H
